package com.xiaoxiong.mami.service;

import com.xiaoxiong.mami.dao.daomain.Goods;
import com.xiaoxiong.mami.dao.mapperImpl.GoodsMapperImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Administrator on 2017/7/27.
 */
@Service
public class GoodsService implements GoodsMapperImpl {

    @Autowired
    GoodsMapperImpl goodsMapperImpl;

    @Override
    public List<Goods> getGoodsList() {
        return goodsMapperImpl.getGoodsList();
    }

    @Override
    public int getGoodsCount() {
        return goodsMapperImpl.getGoodsCount();
    }

    @Override
    public Goods getGoodsById(String goodsId) {
        return goodsMapperImpl.getGoodsById(goodsId);
    }

    @Override
    public List<Goods> getGoodsByGoodsIds(List<String> goodsIds) {

        return goodsMapperImpl.getGoodsByGoodsIds(goodsIds);
    }

    @Override
    public int insertGood(String goodsId, String title, Double price, String goodsDesc,
                          String images, String thumbUrl, Integer sort, String status,
                          String goodsImages, Integer stock, String setMeal,
                          Integer buyNumMax, String goodsNumber) {

        return goodsMapperImpl.insertGood(goodsId, title, price, goodsDesc, images, thumbUrl,
                                                sort, status, goodsImages, stock, setMeal, buyNumMax,
                                                goodsNumber);
    }

    @Override
    public int updateGoods(String goodsId, String title, Double price, String goodsDesc,
                          String images, String thumbUrl, Integer sort, String status,
                          String goodsImages, Integer stock, String setMeal,
                          Integer buyNumMax, String goodsNumber) {

        return goodsMapperImpl.updateGoods(goodsId, title, price, goodsDesc, images, thumbUrl,
                sort, status, goodsImages, stock, setMeal, buyNumMax,
                goodsNumber);
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return 0;
    }

    @Override
    public int insert(Goods record) {
        return 0;
    }

    @Override
    public int insertSelective(Goods record) {
        return 0;
    }

    @Override
    public Goods selectByPrimaryKey(Long id) {
        return goodsMapperImpl.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Goods record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(Goods record) {
        return 0;
    }
}
